<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateWebConfigTable extends Migration{
    /**
     * 作者
     * 后台网站配置表
     * 添加时间 2016-11-01
     */
    public function up() {
        Schema::create('web_config', function (Blueprint $table) {
            $table->engine='MyISAM';
            $table->increments('id')->unsigned()->comment('自动增长主键');
            $table->string('sign',60)->default('')->comment('标签');
            $table->string('keyname',60)->default('')->comment('标签名字');
            $table->string('keyvalue',2000)->default('')->comment('标签内容');
            $table->string('tip',60)->default('')->comment('标签解释');
            $table->string('type',60)->default('')->comment('标签类型(text文本，textarea多文本)');
            $table->integer('categroy')->unsigned()->index('categroy')->default(0)->comment('类别编号');
            $table->integer('sort')->unsigned()->default(0)->comment('排序');
        });
    }

    /**
     * 作者 柯良志
     * 网站配置表
     * 添加时间 2016-11-01
     */
    public function down(){
        Schema::drop('web_config');
    }
}
